package com.budwk.app.sys.commons.task.job;

import cn.hutool.core.date.DateUtil;
import com.budwk.app.sqfwV2.service.mine.WorkSummaryService;
import com.budwk.starter.job.annotation.SJob;
import lombok.extern.slf4j.Slf4j;
import org.nutz.ioc.loader.annotation.Inject;
import org.nutz.ioc.loader.annotation.IocBean;

import java.util.Date;

/**
 * @author wizzer@qq.com
 */
@IocBean(name = "workSummary",singleton = false)
@Slf4j
public class WorkSummaryJob {

    @Inject
    private WorkSummaryService workSummaryService;

    @SJob("everydayJob")
    public void everyday(String taskId, String params) {
        System.out.println("demo");
        log.info("sjob:{} taskId:{} params:{}", DateUtil.format(new Date(), "yyy-MM-dd") + "工作总结统计", taskId, params);
        workSummaryService.everyday(null, null);
    }
}